package com.servicesManagement.model;
// Generated Dec 13, 2014 11:53:18 AM by Hibernate Tools 3.2.1.GA


import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * ServiceGroup generated by hbm2java
 */
@Entity
@Table(name="SERVICE_GROUP"
    ,schema="SANKAR"
)
public class ServiceGroup  implements java.io.Serializable {


     private BigDecimal serviceGroupId;
     private DependencyType dependencyType;
     private Service service;
     private BigDecimal changedByUserId;
     private Date changedDate;
     private BigDecimal createdByUserId;
     private Date createdDate;
     private String description;
     private Date effectiveDate;
     private Date expirationDate;
     private String serviceOwnerEmail;
     private String serviceOwnerName;
     private Set serviceGroupConfs = new HashSet(0);

    public ServiceGroup() {
    }

	
    public ServiceGroup(BigDecimal serviceGroupId) {
        this.serviceGroupId = serviceGroupId;
    }
    public ServiceGroup(BigDecimal serviceGroupId, DependencyType dependencyType, Service service, BigDecimal changedByUserId, Date changedDate, BigDecimal createdByUserId, Date createdDate, String description, Date effectiveDate, Date expirationDate, String serviceOwnerEmail, String serviceOwnerName, Set serviceGroupConfs) {
       this.serviceGroupId = serviceGroupId;
       this.dependencyType = dependencyType;
       this.service = service;
       this.changedByUserId = changedByUserId;
       this.changedDate = changedDate;
       this.createdByUserId = createdByUserId;
       this.createdDate = createdDate;
       this.description = description;
       this.effectiveDate = effectiveDate;
       this.expirationDate = expirationDate;
       this.serviceOwnerEmail = serviceOwnerEmail;
       this.serviceOwnerName = serviceOwnerName;
       this.serviceGroupConfs = serviceGroupConfs;
    }
   
     @Id 
    
    @Column(name="SERVICE_GROUP_ID", unique=true, nullable=false, scale=0)
    public BigDecimal getServiceGroupId() {
        return this.serviceGroupId;
    }
    
    public void setServiceGroupId(BigDecimal serviceGroupId) {
        this.serviceGroupId = serviceGroupId;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="DEPENDENCY_TYPE_ID")
    public DependencyType getDependencyType() {
        return this.dependencyType;
    }
    
    public void setDependencyType(DependencyType dependencyType) {
        this.dependencyType = dependencyType;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="OWNER_SERVICE_ID")
    public Service getService() {
        return this.service;
    }
    
    public void setService(Service service) {
        this.service = service;
    }
    
    @Column(name="CHANGED_BY_USER_ID")
    public BigDecimal getChangedByUserId() {
        return this.changedByUserId;
    }
    
    public void setChangedByUserId(BigDecimal changedByUserId) {
        this.changedByUserId = changedByUserId;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="CHANGED_DATE", length=7)
    public Date getChangedDate() {
        return this.changedDate;
    }
    
    public void setChangedDate(Date changedDate) {
        this.changedDate = changedDate;
    }
    
    @Column(name="CREATED_BY_USER_ID")
    public BigDecimal getCreatedByUserId() {
        return this.createdByUserId;
    }
    
    public void setCreatedByUserId(BigDecimal createdByUserId) {
        this.createdByUserId = createdByUserId;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="CREATED_DATE", length=7)
    public Date getCreatedDate() {
        return this.createdDate;
    }
    
    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }
    
    @Column(name="DESCRIPTION")
    public String getDescription() {
        return this.description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="EFFECTIVE_DATE", length=7)
    public Date getEffectiveDate() {
        return this.effectiveDate;
    }
    
    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="EXPIRATION_DATE", length=7)
    public Date getExpirationDate() {
        return this.expirationDate;
    }
    
    public void setExpirationDate(Date expirationDate) {
        this.expirationDate = expirationDate;
    }
    
    @Column(name="SERVICE_OWNER_EMAIL")
    public String getServiceOwnerEmail() {
        return this.serviceOwnerEmail;
    }
    
    public void setServiceOwnerEmail(String serviceOwnerEmail) {
        this.serviceOwnerEmail = serviceOwnerEmail;
    }
    
    @Column(name="SERVICE_OWNER_NAME")
    public String getServiceOwnerName() {
        return this.serviceOwnerName;
    }
    
    public void setServiceOwnerName(String serviceOwnerName) {
        this.serviceOwnerName = serviceOwnerName;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="serviceGroup")
    public Set getServiceGroupConfs() {
        return this.serviceGroupConfs;
    }
    
    public void setServiceGroupConfs(Set serviceGroupConfs) {
        this.serviceGroupConfs = serviceGroupConfs;
    }




}


